<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>最长连续递增序列</title>
</head>
<body>
  <script>
    function fn(nums) {
      let res = 0, ans = 0;
      for (let i = 1; i < nums.length; i++) {
        if (nums[i] <= nums[i - 1]) {
          res = Math.max(res, i - ans);
          ans = i;
        }
      }
      return Math.max(res, nums.length - ans);
    }
    console.log(fn([1, 3, 5, 4, 7]))
  </script>
</body>
</html>